//==================================================
// 作 者：曾浩
// 日 期：2012-03-15
// 描 述：介绍本文件所要完成的功能以及背景信息等等
//==================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;

namespace MarchEstate.Manager.BusinesEntity
{
	[Serializable]
	[Table(TableName = "WY_Owner", EntityType = EntityType.Table, IsGB = false)]
	public abstract class AbstractOwner : CoreFrame.Business.AbstractBusines
	{
        private string _ownerid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "OwnerId", DataKey = true, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = false)]
        public string OwnerId
        {
            get { return _ownerid; }
            set { _ownerid = value; }
        }
        private string _pownerid;//
		/// <summary>
		/// 
		/// </summary>
        [Column(FieldName = "POwnerId", DataKey = false, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = true)]
        public string POwnerId
		{
			get { return _pownerid; }
			set { _pownerid = value; }
		}

		private int _relationtype;//
		/// <summary>
        /// 0,业主；1，家属；2，租户，-1，客户
		/// </summary>
		[Column(FieldName = "RelationType", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int RelationType
		{
			get { return _relationtype; }
			set { _relationtype = value; }
		}
		private string _name;//姓名
		/// <summary>
		/// 姓名
		/// </summary>
		[Column(FieldName = "Name", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string Name
		{
			get { return _name; }
			set { _name = value; }
		}
		private int _sex;//性别
		/// <summary>
		/// 性别
		/// </summary>
		[Column(FieldName = "Sex", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int Sex
		{
			get { return _sex; }
			set { _sex = value; }
		}
		private DateTime _birthdaydate;//生日
		/// <summary>
		/// 生日
		/// </summary>
		[Column(FieldName = "BirthdayDate", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public DateTime BirthdayDate
		{
			get { return _birthdaydate; }
			set { _birthdaydate = value; }
		}
		private string _hometown;//籍贯
		/// <summary>
		/// 籍贯
		/// </summary>
		[Column(FieldName = "HomeTown", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string HomeTown
		{
			get { return _hometown; }
			set { _hometown = value; }
		}
        private string _ethnic;//民族
		/// <summary>
		/// 民族
		/// </summary>
		[Column(FieldName = "Ethnic", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Ethnic
		{
			get { return _ethnic; }
			set { _ethnic = value; }
		}
        private string _prefession;//行业
		/// <summary>
		/// 行业
		/// </summary>
		[Column(FieldName = "Prefession", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string Prefession
		{
			get { return _prefession; }
			set { _prefession = value; }
		}
		private int _cardtype;//证件类型
		/// <summary>
		/// 证件类型
		/// </summary>
		[Column(FieldName = "CardType", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int CardType
		{
			get { return _cardtype; }
			set { _cardtype = value; }
		}
		private string _cardnum;//证件号码
		/// <summary>
		/// 证件号码
		/// </summary>
		[Column(FieldName = "CardNum", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string CardNum
		{
			get { return _cardnum; }
			set { _cardnum = value; }
		}
		private string _oftenrelaadress;//常用联系地址
		/// <summary>
		/// 常用联系地址
		/// </summary>
		[Column(FieldName = "OftenRelaAdress", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string OftenRelaAdress
		{
			get { return _oftenrelaadress; }
			set { _oftenrelaadress = value; }
		}
		private string _fax;//传真
		/// <summary>
		/// 传真
		/// </summary>
		[Column(FieldName = "Fax", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Fax
		{
			get { return _fax; }
			set { _fax = value; }
		}
		private string _qq;//QQ
		/// <summary>
		/// QQ
		/// </summary>
		[Column(FieldName = "QQ", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string QQ
		{
			get { return _qq; }
			set { _qq = value; }
		}
        private string _telephone;//住宅电话
		/// <summary>
		/// 住宅电话
		/// </summary>
        [Column(FieldName = "Telephone", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string Telephone
		{
            get { return _telephone; }
            set { _telephone = value; }
		}
		private string _oftenmobile;//常用手机号
		/// <summary>
		/// 常用手机号
		/// </summary>
		[Column(FieldName = "OftenMobile", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string OftenMobile
		{
			get { return _oftenmobile; }
			set { _oftenmobile = value; }
		}
		private string _standmobile;//备用手机号
		/// <summary>
		/// 备用手机号
		/// </summary>
		[Column(FieldName = "StandMobile", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string StandMobile
		{
			get { return _standmobile; }
			set { _standmobile = value; }
		}
		private string _mail;//邮箱
		/// <summary>
		/// 邮箱
		/// </summary>
		[Column(FieldName = "Mail", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Mail
		{
			get { return _mail; }
			set { _mail = value; }
		}
		private string _picture;//个人图片
		/// <summary>
		/// 个人图片
		/// </summary>
		[Column(FieldName = "Picture", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Picture
		{
			get { return _picture; }
			set { _picture = value; }
		}
		private DateTime _addtime;//录入时间
		/// <summary>
		/// 录入时间
		/// </summary>
		[Column(FieldName = "Addtime", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public DateTime Addtime
		{
			get { return _addtime; }
			set { _addtime = value; }
		}
		private string _pym;//拼音码
		/// <summary>
		/// 拼音码
		/// </summary>
		[Column(FieldName = "Pym", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Pym
		{
			get { return _pym; }
			set { _pym = value; }
		}
		private int _wbm;//五笔码
		/// <summary>
		/// 五笔码
		/// </summary>
		[Column(FieldName = "Wbm", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int Wbm
		{
			get { return _wbm; }
			set { _wbm = value; }
		}

        private int _registerflag;
        /// <summary>
        /// 入伙标志
        /// </summary>
        [Column(FieldName = "RegisterFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int RegisterFlag
        {
            get { return _registerflag; }
            set { _registerflag = value; }
        }

		private int _deleteflag;//删除标志
		/// <summary>
		/// 删除标志
		/// </summary>
		[Column(FieldName = "DeleteFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int DeleteFlag
		{
			get { return _deleteflag; }
			set { _deleteflag = value; }
		}
		private string _memo;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "Memo", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Memo
		{
			get { return _memo; }
			set { _memo = value; }
		}

        private List<AbstractServiceItem> _serviceItemList;
        /// <summary>
        /// 业主关联的服务项目
        /// </summary>
        public List<AbstractServiceItem> ServiceItemList
        {
            get { return _serviceItemList; }
            set { _serviceItemList = value; }
        }

        private List<AbstractCars> _cars;
        /// <summary>
        /// 业主拥有的车辆
        /// </summary>
        public List<AbstractCars> Cars
        {
            get { return _cars; }
            set { _cars = value; }
        }

        private List<AbstractCarport> _carport;
        /// <summary>
        /// 业主拥有的车位
        /// </summary>
        public List<AbstractCarport> Carport
        {
            get { return _carport; }
            set { _carport = value; }
        }

        private string _roomnumber;
        /// <summary>
        /// 业主拥有的房间
        /// </summary>
        public string RoomNumber
        {
            get { return _roomnumber; }
            set { _roomnumber = value; }
        }


        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public abstract bool Save();

        /// <summary>
        /// 批量保存
        /// </summary>
        /// <param name="ownerList"></param>
        /// <returns></returns>
        public abstract bool Save(List<AbstractOwner> ownerList);

        /// <summary>
        /// 保存E:\物业管理系统\物业开发\trunk\WY.Business\CoreBusines\Room\AbstractWY_Area.cs
        /// </summary>
        /// <param name="edittype">0:房间 1：门面</param>
        /// <param name="addtype">0:操作业主 1：操作业主成员</param>
        /// <param name="roomid"></param>
        /// <returns></returns>
        public abstract bool Save(int edittype,int addtype, string _roomId);

        /// <summary>
        /// 房间过户等
        /// </summary>
        /// <param name="_ownerId"></param>
        /// <returns></returns>
        public abstract bool Delete(string _ownerId);
        /// <summary>
        /// 获取业主信息
        /// </summary>
        /// <param name="_ownerId">业主ID</param>
        /// <returns></returns>
        public abstract AbstractOwner GetOwner(string _ownerId);
        /// <summary>
        /// 获取业主信息
        /// </summary>
        /// <param name="_roomId">房间ID</param>
        /// <returns></returns>
        public abstract AbstractOwner GetOwnerR(string _roomId);

        /// <summary>
        /// 获取业主列表
        /// </summary>
        /// <returns></returns>
        public abstract List<AbstractOwner> GetOwnerList(PageInfo page,string personName,string IdCard,string mobile);

        /// <summary>
        /// 获取业主家庭成员列表
        /// </summary>
        /// <returns></returns>
        public abstract List<AbstractOwner> GetOwnerList(string _pOwnerId);

        /// <summary>
        /// 查询入伙、未入伙的业主
        /// </summary>
        /// <param name="_registerFlag">0未入伙 1入伙</param>
        /// <returns></returns>
        public abstract List<AbstractOwner> GetOwnerList(int _registerFlag);
	}
}